<?php

// [ api预警 ]

namespace app\api\behavior;
use think\Db;
use think\Request;

class ApiMinitor
{
    public function run(&$result)
    {
        $data['api']    = Request::instance()->url();
        $data['result'] = json_encode($result,JSON_UNESCAPED_UNICODE);
        $data['create_time'] = time();
        Db::name('api_minitor')->insert($data);
    }
}
